package game.scene;

import game.Goal3;
import game.ball.Possessed;
import game.ball.SoccerBall;
import game.components.Annunciator;
import game.components.Board;
import game.components.Camera;
import game.components.InformationLabel;
import game.components.ScoreLabel;
import game.components.TimerLabel;
import game.components.UserPlayerMark;
import game.players.SoccerPlayer;
import game.players.SoccerPlayerCPU;
import game.players.SoccerPlayerCPUMate;
import game.players.SoccerPlayerUser;
import game.players.cpu.opponent.CelebratingCPUOppPlayer;
import game.players.cpu.opponent.CryingCPUOppPlayer;
import game.players.cpu.teammate.WithoutBallStationaryCPUMate;
import game.players.goalkeeper.Goalkeeper;
import game.players.user.CelebratingUserPlayer;
import game.players.user.CryingUserPlayer;
import game.players.user.WithBallSweepingUserPlayer;
import game.players.user.movements.WithBallStationaryUser;
import game.soccerField.Arc;
import game.soccerField.SoccerField;
import game.soccerField.lines.LeftNorthGoalLine;
import game.soccerField.lines.LeftSouthGoalLine;
import game.soccerField.lines.LimitLine;
import game.soccerField.lines.NorthLateralLine;
import game.soccerField.lines.RightNorthGoalLine;
import game.soccerField.lines.RightSouthGoalLine;
import game.soccerField.lines.SouthLateralLine;

import java.awt.Point;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;

import utils.tasks.CenterServeTask;
import utils.tasks.ExpireTask;
import utils.tasks.LeftGoalKickTask;
import utils.tasks.LeftNorthCornerKickTask;
import utils.tasks.RightGoalKickTask;
import utils.tasks.RightNorthCornerKickTask;
import utils.tasks.RightSouthCornerKickTask;

import com.uqbar.vainilla.GameScene;
import com.uqbar.vainilla.appearances.Sprite;

public abstract class MatchScene extends GameScene {
	
	private List<SoccerPlayer> players   = new ArrayList<SoccerPlayer>();
	private List<SoccerPlayer> teammates = new ArrayList<SoccerPlayer>();
	private List<SoccerPlayer> opponents = new ArrayList<SoccerPlayer>();
	private List<Arc> arcs               = new ArrayList<Arc>();
	private List<LimitLine> lines        = new ArrayList<LimitLine>();
	private boolean ballOnGame           = false;
	
	private Annunciator annunciator;
	private ScoreLabel playerScore;
	private ScoreLabel enemyScore;
	private TimerLabel timer;
	private SoccerBall soccerBall;
	private Camera camera;
	private SoccerField field;
	private SoccerPlayer userPlayer;
	private UserPlayerMark userPlayerMark;
	private Board scoreboard;
	private Board timerBoard;	
	private boolean isAnnouncing = false;
	 
	public static final int SOCCER_FIELD_INITIAL_POSITION_X = -1150;
	public static final int SOCCER_FIELD_INITIAL_POSITION_Y = -240;
	
	private static final int MATCH_DURATION = 45;

	public MatchScene(Camera camera, int playerScore, int enemyScore, int minute, int second) {
		this.setSoccerBall(new SoccerBall(426, 325));
		this.setUpArcs();
		this.setUpTeammates();
		this.setUpOpponents();
		this.setUpField();
		this.setUpLines();

		this.buildScoreboard(playerScore, enemyScore);
		InformationLabel hyphenLabel = new InformationLabel(this.getScoreboard().getX() + 33, this.getScoreboard().getY());
		hyphenLabel.showInformation("-");
		hyphenLabel.setZ(5);
		this.buildTimer(camera, minute, second);
		
		
		this.setCamera(camera);
		this.setAnnunciator(new Annunciator());
		this.addComponents(this.getCamera(), this.getField());
		this.addComponents(this.getSoccerPlayers());
		this.addComponent(this.getSoccerBall());
		this.addComponents(this.getArcs());
		this.setUserPlayerMark(new UserPlayerMark(this.getUserPlayer()));
		this.setZs();
		this.addComponents(this.lines);
		this.addComponents(this.getScoreboard(), this.getTimerBoard(), this.getPlayerScore(), hyphenLabel, this.getEnemyScore(), this.getTimer());
	}

	private void setZs() {
		for (LimitLine line : this.getLines())
			//Si queres que se vean las lineas para testear, cambia el Z a 5
			line.setZ(5);
		this.getField().setZ(0);
		for (SoccerPlayer player : this.getPlayers())
			player.setZ(1);
		this.getSoccerBall().setZ(2);
		for (Arc arc : this.getArcs())
			arc.setZ(3);
		this.getUserPlayerMark().setZ(4);
		this.getAnnunciator().setZ(5);
		this.getTimerBoard().setZ(5);
		this.getScoreboard().setZ(5);
		this.getPlayerScore().setZ(5);
		this.getEnemyScore().setZ(5);
		this.getTimer().setZ(5);
	}

	private void buildTimer(Camera camera, int minutes, int seconds) {
		this.setTimerBoard(new Board(camera.getWidth() - 101, 1, 100, 30));
		this.setTimer(new TimerLabel(this.getTimerBoard().getX() + 20, this.getTimerBoard().getY(), minutes, seconds));		
	}

	private void buildScoreboard(int playerScore, int enemyScore) {
		this.setScoreboard(new Board(1, 1, 75, 30));
		
		this.setPlayerScore(new ScoreLabel(this.getScoreboard().getX() + 9, this.getScoreboard().getY(), playerScore));
		this.getPlayerScore().showInformation();
		
		this.setEnemyScore(new ScoreLabel(this.getScoreboard().getX() + 51, this.getScoreboard().getY(), enemyScore));
		this.getEnemyScore().showInformation();
	}

	public void setUpLines() {
		this.lines.add(new NorthLateralLine(-680,-140,2310,10));//linea lateral del norte
		this.lines.add(new SouthLateralLine(-900,880,2700,10));//linea lateral del sur
		this.lines.add(new LeftNorthGoalLine(-720,-120,10,175));//linea de fondo noroeste
		this.lines.add(new LeftNorthGoalLine(-760,70,10,175));//linea de fondo noroeste 2
		this.lines.add(new LeftSouthGoalLine(-860,450,10,175));//linea de fondo del suroeste
		this.lines.add(new LeftSouthGoalLine(-900,650,10,200));//linea de fondo del suroeste2
		this.lines.add(new RightNorthGoalLine(1640,-120,10,175));//linea de fondo noreste
		this.lines.add(new RightNorthGoalLine(1670,60,10,175));//linea de fondo noreste2
		this.lines.add(new RightSouthGoalLine(1750,450,10,175));//linea de fondo del sureste
		this.lines.add(new RightSouthGoalLine(1800,650,10,200));//linea de fondo del sureste2
	}

	private void setUpArcs() {
		this.getArcs().add(new Arc(1650,145));
		
		Arc arc = new Arc(-925,145);
		Sprite sprite = ((Sprite)arc.getAppearance()).flipHorizontally();
		arc.setAppearance(sprite);
		this.getArcs().add(arc);
	}

	protected abstract void setUpOpponents();

	protected abstract void setUpTeammates();

	public void setOppenentsArc() {
		for(SoccerPlayer o : this.getOpponents())
			o.setRivalArc(this.getLeftArc());
	}
	
	public void setTeammatesArc() {
		for(SoccerPlayer t : this.getTeammates())
			t.setRivalArc(this.getRightArc());
	}

	private void setUpField() {
		SoccerField field = new SoccerField(SOCCER_FIELD_INITIAL_POSITION_X, SOCCER_FIELD_INITIAL_POSITION_Y);
		this.setField(field);
	}
	
	public void moveSprites(double x, double y) {
		this.getField().move(-x, -y);

		for(Arc arc : this.getArcs())
			arc.move(-x, -y);
		
		for (SoccerPlayer player : this.getSoccerPlayers()) {
			if (!player.isWithBall())
				player.move(-x, -y);
		}
		for(LimitLine line : this.lines)
			line.move(-x,-y);
	}
	
	public void locateBall(double x, double y) {
		this.getField().move(-x, -y);

		for(Arc arc : this.getArcs())
			arc.move(-x, -y);
		
		for (SoccerPlayer player : this.getSoccerPlayers()) {
			player.move(-x, -y);
		}
		
		for(LimitLine line : this.lines)
			line.move(-x,-y);
	}
	
	public SoccerPlayerCPU getCloserBallTeammate(SoccerPlayer player) {
		SoccerPlayerCPU closer = null;
		double minDist = 999999;
		for(SoccerPlayer player2 : this.teammates){
			if(!player2.equals(player) && this.distanceToBall(player2) < minDist && !player2.isGoalKeeper()) {
				closer = (SoccerPlayerCPU) player2;
				minDist = this.distanceToBall(player2);
			}				
		}
		return closer;
	}	
	
	public SoccerPlayer getOppCloserBall(){
		SoccerPlayer closer = null;
		double minDist = 999999;
		for(SoccerPlayer sp : this.opponents){
			if(this.distanceToBall(sp) < minDist && !sp.isGoalKeeper()){
				closer = sp;
				minDist = this.distanceToBall(sp);
			}				
		}
		return closer;
	}

	private double distanceToBall(SoccerPlayer sp) {
		return Point.distance(sp.getX(),sp.getY(),this.soccerBall.getX(),this.soccerBall.getY());
	}
	
	public void removeUserPlayerMark() {
		SoccerPlayer player = this.getUserPlayerMark().getPlayer();
		
		player.setWithPlayingMark(false);
		if (!player.isDestroyPending()) {
			player.setState(new WithoutBallStationaryCPUMate(player));
		}
		
		this.getUserPlayerMark().destroy();
	}
	
	public void updateScoreboard(Arc arc) {
		if (this.getUserPlayer().getRivalArc().equals(arc)) {
			this.getPlayerScore().setScore(this.getPlayerScore().getScore() + 1);
			this.getPlayerScore().showInformation();
		}
		else {
			this.getEnemyScore().setScore(this.getEnemyScore().getScore() + 1);
			this.getEnemyScore().showInformation();
		}
	}
	
	public void showPlayersAttitudeAfterGoal(Arc arc) {		
		if (this.getUserPlayer().getRivalArc().equals(arc)) {
			this.showUserTeamCelebrating();
		}
		else {
			this.showEnemyTeamCelebrating();
		}
	}

	private void showEnemyTeamCelebrating() {
		this.getUserPlayer().setState(new CryingUserPlayer(this.getUserPlayer()));
		for (SoccerPlayer mate : this.getTeammates()) {
			if (!mate.isGoalKeeper())
				mate.setState(new CryingUserPlayer(mate));
		}
		for (SoccerPlayer opponent: this.getOpponents()) {
			if (!opponent.isGoalKeeper())
				opponent.setState(new CelebratingCPUOppPlayer(opponent));
		}
	}

	private void showUserTeamCelebrating() {
		this.getUserPlayer().setState(new CelebratingUserPlayer(this.getUserPlayer()));
		for (SoccerPlayer mate : this.getTeammates()) {
			if (!mate.isGoalKeeper())
				mate.setState(new CelebratingUserPlayer(mate));
		}
		for (SoccerPlayer opponent: this.getOpponents()) {
			if (!opponent.isGoalKeeper())
				opponent.setState(new CryingCPUOppPlayer(opponent));
		}
	}
	
	private void showAllCelebrating() {
		this.getUserPlayer().setState(new CelebratingUserPlayer(this.getUserPlayer()));
		for (SoccerPlayer mate : this.getTeammates()) {
			if (!mate.isGoalKeeper())
				mate.setState(new CelebratingUserPlayer(mate));
		}
		for (SoccerPlayer opponent: this.getOpponents()) {
			if (!opponent.isGoalKeeper())
				opponent.setState(new CelebratingCPUOppPlayer(opponent));
		}
	}
	
	public void showFinalScene() {
		this.getAnnunciator().changeAnnouncement("FIN DEL PARTIDO");
		this.addComponent(this.getAnnunciator());
		if (this.getPlayerScore().getScore() > this.getEnemyScore().getScore())
			this.showUserTeamCelebrating();
		else {
			if (this.getPlayerScore().getScore() < this.getEnemyScore().getScore())
				this.showEnemyTeamCelebrating();
			else {
				this.showAllCelebrating();
			}
		}
		this.getTimer().reset();
		this.getTimer().freeze();
	}

	public boolean areTeammates(SoccerPlayer p1, SoccerPlayer p2) {		
		return this.teammates.contains(p1) && this.teammates.contains(p2) || 
				this.opponents.contains(p1) && this.opponents.contains(p2);
	}
	
	public void changeBallPossessionTo(SoccerPlayer player) {
		this.getSoccerBall().setState(new Possessed(player));
	}
	
	public boolean isMateOfWithBall(SoccerPlayer player) {
		if (!this.getSoccerBall().isFree() && !player.equals(this.getSoccerBall().getPlayer())) {
			return player.isMateOf(this.getSoccerBall().getPlayer());
		}
		return false;
	}
	
	public boolean isMateOfChasingTheBall(SoccerPlayer player) {
		for (SoccerPlayer player2 : this.getPlayers()) {
			if (player.isMateOf(player2) && !player2.isGoalKeeper() && !player.equals(player2))
				if (player2.isChasingTheBall())
					return true;
		}
		return false;
	}
	
	public boolean isTimeOver() {
		return this.getTimer().getMinutes() >= MATCH_DURATION;
	}

	public void changeFromUserToCPU(SoccerPlayer player, SoccerPlayerCPU closerBallPlayer) {
		SoccerPlayer newCPUPlayer = new SoccerPlayerCPUMate(player.getX(), player.getY(), closerBallPlayer.getAreaX(), closerBallPlayer.getAreaY(), player.getRivalArc());
		SoccerPlayer newUserPlayer = new SoccerPlayerUser(closerBallPlayer.getX(), closerBallPlayer.getY(), closerBallPlayer.getRivalArc());
		
		this.changePlayers(player, closerBallPlayer, newCPUPlayer, newUserPlayer);
	}
	
	public void changeFromStationaryCPUToUser(SoccerPlayer userPlayer, SoccerPlayerCPU cpuPlayer) {
		SoccerPlayer newCPUPlayer = new SoccerPlayerCPUMate(userPlayer.getX(), userPlayer.getY(), cpuPlayer.getAreaX(), cpuPlayer.getAreaY(), userPlayer.getRivalArc());
		SoccerPlayer newUserPlayer = new SoccerPlayerUser(cpuPlayer.getX(), cpuPlayer.getY(), cpuPlayer.getRivalArc());
		
		this.changePlayers(userPlayer, cpuPlayer, newCPUPlayer, newUserPlayer);
		this.changeBallPossessionTo(newUserPlayer);
		newUserPlayer.setState(new WithBallStationaryUser(newUserPlayer));
	}
	
	public void changeFromSweepingCPUToUser(SoccerPlayer userPlayer, SoccerPlayerCPU cpuPlayer) {
		SoccerPlayer newCPUPlayer = new SoccerPlayerCPUMate(userPlayer.getX(), userPlayer.getY(), cpuPlayer.getAreaX(), cpuPlayer.getAreaY(), userPlayer.getRivalArc());
		SoccerPlayer newUserPlayer = new SoccerPlayerUser(cpuPlayer.getX(), cpuPlayer.getY(), cpuPlayer.getRivalArc());
		
		this.changePlayers(userPlayer, cpuPlayer, newCPUPlayer, newUserPlayer);
		this.changeBallPossessionTo(newUserPlayer);
		newUserPlayer.setState(new WithBallSweepingUserPlayer(newUserPlayer, cpuPlayer.isInRightDirection()));
	}

	private void changePlayers(SoccerPlayer oldUserPlayer, SoccerPlayerCPU oldCPUPlayer, SoccerPlayer newCPUPlayer, SoccerPlayer newUserPlayer) {
		this.getTeammates().remove(oldCPUPlayer);
		this.getTeammates().remove(oldUserPlayer);
		this.getPlayers().remove(oldCPUPlayer);
		this.getPlayers().remove(oldUserPlayer);
		oldUserPlayer.destroy();
		oldCPUPlayer.destroy();
		newCPUPlayer.setZ(oldCPUPlayer.getZ());
		newUserPlayer.setZ(oldUserPlayer.getZ());
		
		this.addComponents(newCPUPlayer, newUserPlayer);
		this.setUserPlayer(newUserPlayer);
		this.getUserPlayer().addUserPlayerMark();
		this.getTeammates().add(newUserPlayer);
		this.getTeammates().add(newCPUPlayer);
		this.getPlayers().add(newUserPlayer);
		this.getPlayers().add(newCPUPlayer);
	}
	
	
	
	
	
	
	
	//CAMBIOS DE ESCENA
	
	public void announceGoal(Arc arc) {
		this.getAnnunciator().changeAnnouncement("¡¡¡¡GOOOOOOOOOL!!!!");
		this.addComponent(this.getAnnunciator());
		Timer timer = new Timer();
		
		if (this.getUserPlayer().getRivalArc().equals(arc))
			timer.schedule(new CenterServeTask(this, new RivalServeScene(this.getCamera(), this.getPlayerScore().getScore(),
					this.getEnemyScore().getScore(), this.getTimer().getMinutes(), this.getTimer().getSeconds())), 3000);
		else
			timer.schedule(new CenterServeTask(this, new PlayerServeScene(this.getCamera(), this.getPlayerScore().getScore(),
					this.getEnemyScore().getScore(), this.getTimer().getMinutes(), this.getTimer().getSeconds())), 3000);
	}
	
	public void announceGoalKick() {
		this.getAnnunciator().changeAnnouncement("Goal Kick");
		this.addComponent(this.getAnnunciator());
	}
	
	public void announceCornerKick() {
		this.getAnnunciator().changeAnnouncement("Corner Kick");
		this.addComponent(this.getAnnunciator());
	}
	
	public void announceThrowIn() {
		this.getAnnunciator().changeAnnouncement("Throw in");
		this.addComponent(this.getAnnunciator());
	}
	
	public void announceRightGoalKick() {
		this.announceGoalKick();
		new Timer().schedule(new RightGoalKickTask(this),2000);
	}
	
	public void announceLeftGoalKick() {
		this.announceGoalKick();
		new Timer().schedule(new LeftGoalKickTask(this),2000);		
	}
	
	public void announceRightNorthCornerKick(){
		this.announceCornerKick();
		new Timer().schedule(new RightNorthCornerKickTask(this),2000);
	}
	
	public void announceRightSouthCornerKick(){
		this.announceCornerKick();
		new Timer().schedule(new RightSouthCornerKickTask(this),2000);
	}
	
	public void announceLeftNorthCornerKick() {
		this.announceCornerKick();
		new Timer().schedule(new LeftNorthCornerKickTask(this),2000);
	}
	
	public void announceLeftSouthCornerKick() {
		this.announceCornerKick();
		new Timer().schedule(new ExpireTask<MatchScene>(this){

			@Override
			public void run() {
				this.getCallBackClass().doLeftSouthCornerKick();				
			}
			
		},2000);
	}
	
	public void announceUserNorthThrowIn(final double x,final double y) {
		this.announceThrowIn();
		new Timer().schedule(new ExpireTask<MatchScene>(this){

			@Override
			public void run() {
				this.getCallBackClass().doUserNorthThrowIn(x,y);				
			}
			
		},2000);
	}
	
	public void announceOppNorthThrowIn(final double x,final double y) {
		this.announceThrowIn();
		new Timer().schedule(new ExpireTask<MatchScene>(this){

			@Override
			public void run() {
				this.getCallBackClass().doOppNorthThrowIn(x,y);				
			}
			
		},2000);
	}
	
	public void announceOppSouthThrowIn(final double x,final double y) {
		this.announceThrowIn();
		new Timer().schedule(new ExpireTask<MatchScene>(this){

			@Override
			public void run() {
				this.getCallBackClass().doOppSouthThrowIn(x,y);				
			}
			
		},2000);
	} 
	

	public void announceUserSouthThrowIn(final double x,final double y) {
		this.announceThrowIn();
		new Timer().schedule(new ExpireTask<MatchScene>(this){

			@Override
			public void run() {
				this.getCallBackClass().doUserSouthThrowIn(x,y);				
			}
			
		},2000);		
	}

	public boolean isAnnouncing() {
		return this.isAnnouncing;
	}
	
	public void destroyAnnunciator(){
		this.getAnnunciator().destroy();
	}
	
	public void doCenterServe(MatchScene scene) {
		((Goal3) this.getGame()).changeToPostGoalScene(scene);
	}
	
	public void doRightGoalKick() {
		((Goal3) this.getGame()).changeToRightGoalKickScene();
	}
	
	public void doLeftGoalKick() {
		((Goal3) this.getGame()).changeToLeftGoalKickScene();		
	}
	
	public void doRightNorthCornerKick() {
		((Goal3) this.getGame()).changeToRightNorthCornerKickScene();		
	}

	public void doRightSouthCornerKick() {
		((Goal3) this.getGame()).changeToRightSouthCornerKickScene();			
	}
	
	public void doLeftNorthCornerKick() {
		((Goal3) this.getGame()).changeToLeftNorthCornerKickScene();				
	}
	
	public void doLeftSouthCornerKick() {
		((Goal3) this.getGame()).changeToLeftSouthCornerKickScene();		
	}
	
	public void doUserNorthThrowIn(double x, double y){
		((Goal3) this.getGame()).changeToUserNorthThrowInScene(x,y);	
	}
	
	public void doOppNorthThrowIn(double x, double y){
		((Goal3) this.getGame()).changeToOppNorthThrowInScene(x,y);	
	}
	
	public void doOppSouthThrowIn(double x, double y) {
		((Goal3) this.getGame()).changeToOppSouthThrowInScene(x,y);		
	}
	
	protected void doUserSouthThrowIn(double x, double y) {
		((Goal3) this.getGame()).changeToUserSouthThrowInScene(x,y);		
	}

	public void destroyPlayers(){
		for(SoccerPlayer sp : this.getPlayers())
			sp.destroy();
	}

	//ACCESORS
	public Arc getRightArc() {
		return this.getArcs().get(0);
	}
	
	public Arc getLeftArc() {
		return this.getArcs().get(1);
	}
	
	public List<LimitLine> getLines() {
		return lines;
	}

	public SoccerBall getSoccerBall() {
		return soccerBall;
	}

	public void setSoccerBall(SoccerBall soccerBall) {
		this.soccerBall = soccerBall;
	}

	public List<SoccerPlayer> getSoccerPlayers() {
		return players;
	}

	public void setCamera(Camera camera) {
		this.camera = camera;
	}

	public Camera getCamera() {
		return camera;
	}

	public SoccerField getField() {
		return field;
	}

	public void setField(SoccerField field) {
		this.field = field;
	}
	
	public List<SoccerPlayer> getTeammates() {
		return teammates;
	}	
	
	public List<Arc> getArcs() {
		return arcs;
	}

	public List<SoccerPlayer> getOpponents() {
		return opponents;
	}

	public List<SoccerPlayer> getPlayers() {
		return players;
	}
	
	public SoccerPlayer getUserPlayer() {
		return userPlayer;
	}
	
	public Annunciator getAnnunciator() {
		return annunciator;
	}

	public void setAnnunciator(Annunciator annunciator) {
		this.annunciator = annunciator;
	}

	public void setUserPlayer(SoccerPlayer userPlayer) {
		this.userPlayer = userPlayer;		
	}
	
	public void setUserPlayerMark(UserPlayerMark userPlayerMark) {
		this.userPlayerMark = userPlayerMark;
		this.addComponent(this.userPlayerMark);
	}
	
	public Goalkeeper getOppGoalkeeper(){
		for(SoccerPlayer sp : this.opponents){
			if(sp.isGoalKeeper())
				return (Goalkeeper)sp;
		}
		return null;
	}

	public Goalkeeper getMateGoalkeeper() {
		for(SoccerPlayer sp : this.teammates){
			if(sp.isGoalKeeper())
				return (Goalkeeper)sp;
		}
		return null;
	}

	public void setPlayers(List<SoccerPlayer> players) {
		this.players = players;
	}

	public void setArcs(List<Arc> arcs) {
		this.arcs = arcs;
	}

	public void setTeammates(List<SoccerPlayer> teammates) {
		this.teammates = teammates;
	}

	public void setOpponents(List<SoccerPlayer> opponents) {
		this.opponents = opponents;
	}
	
	public Board getScoreboard() {
		return scoreboard;
	}

	public void setScoreboard(Board scoreboard) {
		this.scoreboard = scoreboard;
	}

	public Board getTimerBoard() {
		return timerBoard;
	}

	public void setTimerBoard(Board timer) {
		this.timerBoard = timer;
	}

	public ScoreLabel getPlayerScore() {
		return playerScore;
	}

	public void setPlayerScore(ScoreLabel playerScore) {
		this.playerScore = playerScore;
	}

	public ScoreLabel getEnemyScore() {
		return enemyScore;
	}

	public void setEnemyScore(ScoreLabel enemyScore) {
		this.enemyScore = enemyScore;
	}

	public TimerLabel getTimer() {
		return timer;
	}

	public void setTimer(TimerLabel timer) {
		this.timer = timer;
	}

	public UserPlayerMark getUserPlayerMark() {
		return userPlayerMark;
	}

	public boolean isBallOnGame() {
		return ballOnGame;
	}

	public void setBallOnGame(boolean ballOnGame) {
		this.ballOnGame = ballOnGame;
	}
	
	public void setAnnouncing(boolean isAnnouncing) {
		this.isAnnouncing = isAnnouncing;
	}
	


}